<template>
  <view class="container">
    <view>计数：{{ testStore.count }}</view>
    <button @click="testStore.increment">加一</button>
    <view>消息：{{ testStore.msg }}</view>
    <input v-model="inputMsg" placeholder="输入新消息" />
    <button @click="testStore.setMsg(inputMsg)">修改消息</button>
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { useTestStore } from '@/store/testStore'

const testStore = useTestStore()
const inputMsg = ref('')
</script>

<style scoped>
.container {
  padding: 32rpx;
}
button {
  margin: 16rpx 0;
}
</style> 